local BenzhenRoomMenu = {}

BenzhenRoomMenu.__index = BenzhenRoomMenu

function BenzhenRoomMenu.Start(gameObject)
	print("BenzhenRoomMenu.Start")

	local object = BenzhenRoomMenu:new()
	object.gameObject = gameObject
	object.transform = gameObject:GetComponent(typeof(UnityEngine.Transform))

	local function onBtnClick(clickObj)
		print("talbe is "..gameObject.name)
		print("btn click! click btn name is "..clickObj.name)
	end

	object.btn1 = {}
	object.btn1.btn = object.transform:Find("Button1")
	object.btn1.btnComponent = object.btn1.btn:GetComponent(typeof(LuaButtonComponent))
	object.btn1.btnComponent:AddBtnClickGameObject(onBtnClick, object.btn1.btn.gameObject)

	object.btn2 = {}
	object.btn2.btn = object.transform:Find("Button2")
	object.btn2.btnComponent = object.btn2.btn:GetComponent(typeof(LuaButtonComponent))
	object.btn2.btnComponent:AddBtnClickGameObject(onBtnClick, object.btn2.btn.gameObject)

	object.btn3 = {}
	object.btn3.btn = object.transform:Find("Button3")
	object.btn3.btnComponent = object.btn3.btn:GetComponent(typeof(LuaButtonComponent))
	object.btn3.btnComponent:AddBtnClickGameObject(onBtnClick, object.btn3.btn.gameObject)

	--gameObject
	return object
end

function BenzhenRoomMenu.Destroy(gameObject, object)
	-- body
end

function BenzhenRoomMenu:new()
	local object = {}
	setmetatable(object, BenzhenRoomMenu)
	
	return object
end

return BenzhenRoomMenu